Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test cases for DB query parsing and sanitization #1923

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

alanwest
Copy link
Member

@alanwest alanwest commented Feb 19, 2025

Towards #984

Opening this PR to start a discussion for how we want to format test cases for database query parsing and sanitization.

Each test case includes the following fields

  • A name identifying the test case
  • A query statement representing the input
  • db.system.name indicates which dialect that the test case targets. A value of other_sql indicates it is applicable to all dialects.
  • An array of valid db.query.text values.
    • For example, the specification states that IN clauses MAY be collapsed. So, both IN (?) and IN (?,?,?) are valid.
  • db.query.summary represents what db.query.summary should equal

For this first iteration I would like to settle on the format for presenting these test cases. In follow ups we can expand the test cases and also handle additional idiosyncrasies of other dialects.

@alanwest alanwest requested review from a team as code owners February 19, 2025 22:09
@alanwest
Copy link
Member Author

@trask @lmolkova I plan to attend the DB semconv meeting tomorrow so we have a chance to discuss this synchronously first.

@lmolkova lmolkova added the Skip Changelog Label to skip the changelog check label Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog Label to skip the changelog check
Projects
Status: Awaiting SIG approval
Development

Successfully merging this pull request may close these issues.

3 participants